<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>小球上下跳动加载效果</title>

  <style>
    body {
      background-color: #e8e8e8;
    }

    .wrapper {
      width: 200px;
      height: 60px;
      position: relative;
      z-index: 1;
    }

    .circle {
      width: 20px;
      height: 20px;
      position: absolute;
      left: 15%;
      border-radius: 50%;
      background-color: #fff;
      transform-origin: 50%;
      animation: circle1 .5s ease infinite alternate;
    }

    @keyframes circle1 {
      0% {
        top: 60px;
        height: 5px;
        border-radius: 50px 50px 25px 25px;
        transform: scaleX(1.7);
      }

      40% {
        height: 20px;
        border-radius: 50%;
        transform: scale(1);
      }

      100% {
        top: 0%;
      }
    }

    .circle:nth-child(2) {
      left: 45%;
      animation-delay: .2s;
    }

    .circle:nth-child(3) {
      left: auto;
      right: 15%;
      animation-delay: .3s;
    }

    .shadow {
      width: 20px;
      height: 4px;
      border-radius: 50%;
      background-color: rgba(0, 0, 0, 0.9);
      position: absolute;
      top: 62px;
      transform-origin: 50%;
      z-index: -1;
      left: 15%;
      filter: blur(1px);
      animation: shadow1 .5s alternate infinite ease;
    }

    @keyframes shadow1 {
      0% {
        transform: scaleX(1.5);
      }

      40% {
        transform: scaleX(1);
        opacity: .7;
      }

      100% {
        transform: scaleX(.2);
        opacity: .4;
      }
    }

    .shadow:nth-child(4) {
      left: 45%;
      animation-delay: .2s
    }

    .shadow:nth-child(5) {
      left: auto;
      right: 15%;
      animation-delay: .3s;
    }
  </style>
</head>

<body>
  <div class="wrapper">
    <div class="circle"></div>
    <div class="circle"></div>
    <div class="circle"></div>
    <div class="shadow"></div>
    <div class="shadow"></div>
    <div class="shadow"></div>
  </div>
</body>

</html>